# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=perl-b-keywords
pkgver=1.26
pkgrel=1
pkgdesc="Lists of reserved barewords and symbol names"
url="https://metacpan.org/pod/B::Keywords"
arch="noarch"
license="GPL-2.0-only OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
checkdepends="perl-test-pod"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RU/RURBAN/B-Keywords-$pkgver.tar.gz"
builddir="$srcdir/B-Keywords-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
b2abf8df82975db907ce4061c00faf7ad03b2324e98ded6a008b58b80b90a3d7bc1d63b68a404b3bfbabed97c1640e355c3d17e15819f9093d12f257754a7393  B-Keywords-1.26.tar.gz
"
